Skip to content

FastAPI-Auth (Tokenly-Auth)

FastAPI-Auth (Tokenly-Auth) is a professional-grade, database-agnostic authentication and session management utility library for Python. It provides high-level security primitives without enforcing any specific database ORM or model structure, giving you total flexibility.

Core Features

  • Crypto Utilities: Argon2id password hashing and verification with brute-force protection logic.
  • Token Management: JWT creation and verification.
  • Session Utilities: Secure refresh token hashing for rotation strategies.
  • Middleware: Storage-agnostic rate limiting and authentication decorators.
  • Validation: Strict structural validation for usernames and passwords.
  • Lightweight: No dependency on SQLModel, Pydantic, or any specific database driver.

Installation

pip install tokenly-auth

Quick Start

See the Core Modules section for detailed guides on how to use each feature.